/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '@/styles/default-vars.scss';
@import '@/styles/vars.scss';

.dag-model {
  // background-image: url("../img/dag_bg.png");
  // background: $--color-main-bg;
  height: 100%;
  ::selection {
    background:transparent;
  }
  ::-moz-selection {
    background:transparent;
  }
  ::-webkit-selection {
    background:transparent;
  }
  .jsplumb-connector {
    z-index: 1;
  }
  .endpoint-tasks {
    margin-top:22px;
  }
  .draggable {
    > span {
      text-align: center;
      display: block;
      margin-top: -4px;
      padding: 0 4px;
      width: 200px;
      margin-left: -81px;
      position: absolute;
      left: 0;
      bottom: -12px;
    }
    .fa {
      display: inline-block;
      position: absolute;
      right: -8px;
      top: -8px;
      z-index: 2;
      cursor: pointer;
    }
    .icos {
      display: inline-block;
      cursor: pointer;
    }
    &.active-tasks {
      span {
        color: $--color-primary;
      }
    }
  }
  .icos {
    width: 18px;
    height: 18px;
    // margin: 2px;
    top: 4px;
    // border-radius: 3px;
    position: relative;
    z-index: 9;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    margin-right: 5px;
  }
  .icos-DATAQUALITY{
    background-image: url("/assets/images/icon/ds/dataquality.png");
    // background-size: 100%;
  }
  .icos-SHELL {
    background-image: url("/assets/images/icon/ds/shell.png"); 
  }
  .icos-WATERDROP {
    background-image: url("/assets/images/icon/ds/waterdrop.png");
  }
  .icos-SUB_PROCESS {
    background-image: url("/assets/images/icon/ds/sub_process.png");
  }
  .icos-PROCEDURE {
    background-image: url("/assets/images/icon/ds/procedure.png");
  }
  .icos-SQL {
    background-image: url("/assets/images/icon/ds/sql.png");
  }
  .icos-SPARK {
    background-image: url("/assets/images/icon/ds/spark.png");
  }
  .icos-FLINK {
    background-image: url("/assets/images/icon/ds/flink.png");
  }
  .icos-MR {
    background-image: url("/assets/images/icon/ds/mr.png");
  }
  .icos-PYTHON {
    background-image: url("/assets/images/icon/ds/python.png");
  }
  .icos-DEPENDENT {
    background-image: url("/assets/images/icon/ds/dependent.png");
  }
  .icos-HTTP {
    background-image: url("/assets/images/icon/ds/http.png");
  }
  .icos-DATAX {
    background-image: url("/assets/images/icon/ds/datax.png");
  }
  .icos-INPUT {
    background-image: url("/assets/images/icon/ds/datax.png");
  }
  .icos-OUTPUT {
    background-image: url("/assets/images/icon/ds/datax.png");
  }
  .icos-SQOOP {
    background-image: url("/assets/images/icon/ds/sqoop.png");
  }
  .icos-CONDITIONS {
    background-image: url("/assets/images/icon/ds/conditions.png");
  }

  .icos-DATACHECK{
    background-image: url("/assets/images/icon/ds/shell.png"); 
  }

  @for $i from 1 through 5 {
    @for $j from 0 through 15 {
      .icos-operator_#{$i}_#{$j} {
        background-image: url("/assets/images/icon/ds/shell.png"); 
      }
    }
  }


  .icos-operator_A {
    background-image: url("/assets/images/icon/ds/shell.png"); 
  }
  .icos-operator_B {
    background-image: url("/assets/images/icon/ds/shell.png"); 
  }
  .icos-operator_C {
    background-image: url("/assets/images/icon/ds/shell.png"); 
  }


  .toolbar {
    width: 200px;
    height: calc(100% - 50px);
    background: $--color-white;
    float: left;
    overflow: auto;
    // border-radius: 0 0 0 3px;
    .title {
      height: 40px;
      line-height: 40px;
      background: #40434C;
      text-align: center;
      // border-radius: 3px 0 0 0;
      span {
        font-size: 14px;
        color: $--color-white;
        font-weight: bold;
      }
    }
  }
  .toolbar-btn {
    overflow: hidden;
    // padding: 8px 11px 0 11px;
    .bar-box {
      // width: 36px;
      // height: 36px;
      // float: left;
      // line-height: 40px;
      padding: 10px 10px;
      margin-bottom: 3px;
      cursor: grab;
      margin-bottom: 3px;
      &:hover{
        background: #e1e2e3;
      }
      // border-radius: 3px;
      .disabled {
        .icos {
          opacity: .6;
          -webkit-filter: grayscale(100%);
          -moz-filter: grayscale(100%);
          -ms-filter: grayscale(100%);
          -o-filter: grayscale(100%);
          filter: grayscale(100%);
          filter: gray;
        }
      }
      &.active {
        background: #e1e2e3;
      }
    }
  }
  .dag-toolbar {
    height: 50px;
    background: $--color-white;
    position: relative;
    // border-radius: 0 3px 0 0;
    .ans-btn-text {
      color: #337ab7;
      .ans-icon {
        font-size: 16px;
      }
    }
    .assist-btn {
      position: absolute;
      left: 10px;
      top: 11px;
      >.name {
        padding-left: 6px;
        vertical-align: middle;
      }
      >.copy-name {
        cursor: pointer;
        padding-left: 4px;
        position: relative;
        top: -2px;
        &:hover {
          i {
            color: #47c3ff;
          }
        }
        i {
          color: #333;
          font-size: 18px;
          vertical-align: middle;
        }
      }
    }
    .save-btn {
      position: absolute;
      right: 8px;
      top: 11px;
      .operation {
        overflow: hidden;
        display: inline-block;
        a {
          float: left;
          width: 28px;
          height: 28px;
          text-align: center;
          line-height: 28px;
          margin-left: 6px;
          border-radius: 3px;
          vertical-align: middle;
          i {
            color: #333;
          }
          &.active {
            // background: #e1e2e3;
            i {
              color: #2d8cf0;
            }
          }
          &.disable {
            i {
              color: #bbb;
            }
          }
        }
      }
    }
  }
  .dag-contect {
    float: left;
    width: calc(100% - 200px);
    height: calc(100% - 50px);
    .dag-container {
      height: 100%;
      overflow-x: auto;
      &::-webkit-scrollbar{
        width: 9px;
      }
    }
  }
  .tools-model {
    height: 60px;
    background: #F4F5F4;
    // border-radius: 3px 3px 0px 0px;
  }
}
#screen {
  margin-right: 5px;
}
.v-modal-custom-log {
  z-index: 101;
}

svg path:hover {
  cursor: pointer;
}

#chart-container .ui-selecting {
  span {
    color: $--color-primary;
  }
}
#chart-container .ui-selected {
  span {
    color: $--color-primary;
  }
}

.contextmenu {
  position: fixed;
  width: 90px;
  background: $--color-white;
  border-radius: 3px;
  box-shadow: 0 2px 4px 1px rgba(0, 0, 0, 0.1);
  padding: 4px 4px;
  visibility:hidden;
  z-index: 10000;
  a {
    height: 30px;
    line-height: 28px;
    display: block;
    i {
      font-size: 16px;
      vertical-align: middle;
      margin-left: 10px;
    }
    span {
      vertical-align: middle;
      font-size: 12px;
      color: #666;
      padding-left: 2px;
    }
    &:hover {
      background: #f6faff;
    }
    &#startRunning {
      i {
        color: $--color-success;
      }
    }
    &#editNodes {
      i {
        color: $--color-primary-light-1;
      }
    }
    &#removeNodes {
      i {
        color: $--color-danger;
      }
    }
    &#copyNodes {
      i {
        color: $--color-warning;
      }
    }
    &.disbled {
      i,span {
        color: #aaa !important;
      }
    }
  }
}

.jtk-demo {
  //min-width: calc(100% - 220px);
  width: 8000px;
  height: 5000px;
  svg:not(:root){
    z-index: 11;
  }
}

.jtk-demo-canvas {
  position: relative;
  height: 100%;
  display: flex;
}

.jtk-bootstrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.jtk-bootstrap .jtk-page-container {
  display: flex;
  width: 100vw;
  justify-content: center;
  flex: 1;
}

.jtk-bootstrap .jtk-container {
  width: 60%;
  max-width: 800px;
}

.jtk-bootstrap-wide .jtk-container {
  width: 80%;
  max-width: 1187px;
}

.jtk-demo-main {
  position: relative;
  margin-top: 98px;
}

.jtk-demo-main .description {
  font-size: 13px;
  margin-top: 25px;
  padding: 13px;
  margin-bottom: 22px;
  background-color: #f4f5ef;
}

.jtk-demo-main .description li {
  list-style-type: disc !important;
}

.canvas-wide {
  padding-top: 10px;
  margin-left: 0;
  -ms-transition: all .1s ease-out;
  -moz-transition: all .1s ease-out;
  -webkit-transition: all .1s ease-out;
  -o-transition: all .1s ease-out;
}

.jtk-demo-dataset {
  text-align: left;
  max-height: 600px;
  overflow: auto;
}

.demo-title {
  float: left;
  font-size: 18px;
}

.controls {
  top: 25px;
  color: $--color-white;
  margin-right: 10px;
  position: absolute;
  left: 25px;
  z-index: 1;
}

.controls i {
  background-color: #3E7E9C;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 0;
  padding: 4px;
}
.w {
  position: absolute;
  z-index: 4;
  font-size: 11px;
  -webkit-transition: background-color 0.25s ease-in;
  -moz-transition: background-color 0.25s ease-in;
  transition: background-color 0.25s ease-in;
  border: 7px solid transparent;
  border-bottom: 30px solid transparent;
  .icos {
    width: 50px;
    height: 50px;
    box-shadow: 2px 2px 19px #e0e0e0;
    -o-box-shadow: 2px 2px 19px #e0e0e0;
    -webkit-box-shadow: 2px 2px 19px #e0e0e0;
    -moz-box-shadow: 2px 2px 19px #e0e0e0;
    -moz-border-radius: 8px;
    border-radius: 8px;
    opacity: 0.8;
    cursor: move;
    background-color: $--color-white;
  }
  .name-p {
    position: absolute;
    left: 50%;
    top: 58px;
    width: 200px;
    text-align: center;
    margin-left: -100px;
    word-break:break-all;
  }
  .ban-p {
    position: absolute;
    left: -4px;
    top: 36px;
    z-index: 21;
    i {
      font-size: 18px;
      color: #ff0000;
      cursor: pointer;
    }
  }
  .state-p {
    width: 20px;
    height: 20px;
    position: absolute;
    top: -20px;
    left: 18px;
    text-align: center;
    cursor: pointer;
    b {
      font-weight: normal;
    }
  }
}

.aLabel {
  -webkit-transition: background-color 0.25s ease-in;
  -moz-transition: background-color 0.25s ease-in;
  transition: background-color 0.25s ease-in;
  background-color: white;
  opacity: 0.8;
  padding: 0.3em;
  border-radius: 0.5em;
  border: 1px solid #346789;
  cursor: pointer;
}

.aLabel.jtk-hover,
.jtk-source-hover,
.jtk-target-hover {
  .icos {
    background-color: #333;
    color: #333;
    -ms-transition: all 0.6s ease-out;
    -moz-transition: all 0.6s ease-out;
    -webkit-transition: all 0.6s ease-out;
    -o-transition: all 0.6s ease-out;
  }
}

.jtk-tasks-active {
  .icos {
    background-color: #2db7f5;
    color: #0097e0;
    -ms-transition: all 0.6s ease-out;
    -moz-transition: all 0.6s ease-out;
    -webkit-transition: all 0.6s ease-out;
    -o-transition: all 0.6s ease-out;
  }
}


.jtk-ep {
  .ep {
    display: block;
  }
}

.ep {
  position: absolute;
  top: -4%;
  right: -1px;
  width: 1em;
  height: 1em;
  z-index: 12;
  background-color: orange;
  cursor: pointer;
  box-shadow: 0 0 2px black;
  -webkit-transition: -webkit-box-shadow 0.25s ease-in;
  -moz-transition: -moz-box-shadow 0.25s ease-in;
  transition: box-shadow 0.25s ease-in;
  border-radius:100%;
  display: none;
}

.ep:hover {
  box-shadow: 0 0 6px black;
}

.statemachine-demo .jtk-endpoint {
  z-index: 3;
}

#canvas {
  .dot-style {
    opacity: 0;
  }
}

.form-mirror {
  width: 100%;
  position: relative;
  z-index: 0;
  .CodeMirror {
    height:auto;
    min-height: 72px;
  }

  .CodeMirror-scroll {
    height:auto;
    min-height: 72px;
    overflow-y: hidden;
    overflow-x: auto;
  }
}

.ans-modal-box.ans-drawer.ans-drawer-right.dagMask.mask {
    width: 628px;
    left: auto;
}


